package cn.wolfcode.luowowo.comment.service;

import cn.wolfcode.luowowo.comment.domain.StrategyComment;
import cn.wolfcode.luowowo.comment.query.StrategyCommentQuery;
import cn.wolfcode.luowowo.member.domain.UserInfo;
import org.springframework.data.domain.Page;

public interface IStrategyCommentService {
    void save(StrategyComment detail, UserInfo userInfo);

    /**
     * 统计指定攻略的 评论数
     *
     * @param id
     * @return
     */
    int countByStrategyId(Long id);

    /**
     * 分页查询查询评论
     *
     * @param qo
     * @return
     */
    Page<StrategyComment> query(StrategyCommentQuery qo);

    /**
     * 点赞
     *  @param toid   评论编号
     * @param fromid 用户编号
     */
    void commentThumbUp(String toid, Long fromid);
}
